package com.wanma.redis;

import java.util.Set;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPoolConfig;

public class JedisTest {
	 static {
	        System.out.println("this is a test!");
	    }
/**
 * redis demo
 * @param args
 */
	public static void main(String[] args) {
		//JedisPoolConfig config = new JedisPoolConfig();
		//Jedis jedis = new Jedis("49.235.149.81",6379);
		Jedis jedis = new Jedis("172.18.0.226",6379);
		
		jedis.auth("123456");
		
		Set<String> set = jedis.keys("*");  
        for (String key : set) {  
            System.out.println(key);  
        } 
		// sy ;
		
		jedis.close();
//		  try {
//			Class.forName("com.wanma.redis.JedisTest");
//		} catch (ClassNotFoundException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}

	}
}
